from Products.CMFCore import CMFCorePermissions
from AccessControl import getSecurityManager, ClassSecurityInfo
from Products.Archetypes.public import *
from Products.Archetypes.interfaces.orderedfolder import IOrderedFolder
from Products.ATContentTypes.atct import ATFolder, ATFolderSchema
from Products.GrupoVisao.config import *

schema  = ATFolderSchema.copy()

class folder_noticias(ATFolder):
    """A frequently asked questions list."""
    schema                      = schema
    archetype_name = 'Pasta de noticias da home'

    meta_type = 'folder_noticias'
    portal_type = 'folder_noticias'
    #content_icon                = "folder_noticias.gif"
    filter_content_types        = True
    allowed_content_types       = ['News Item','Image']
    archetype_name          = "folder_noticias"
    default_view                = "noticias_view"
    immediate_view              = "noticias_view"
    #suppl_views         = ( "folder_summary_view", "folder_tabular_view" )

    security            = ClassSecurityInfo()
    security.declarePublic("listFolderContents")

    actions     = (
            { 'id'              : "view",
              'name'            : "View",
              'action'          : "string:${object_url}/noticias_view",
              'permissions'     : (CMFCorePermissions.View,)
                },
               )

registerType(folder_noticias, PROJECTNAME)